<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-type" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                <option value="{$key}" {in name="key" value="1" }selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Multiplejson')}:</label>
        <div class="col-xs-12 col-sm-8">

            <table class="table fieldlist" data-name="row[multiplejson]" data-template="row[multiplejson]tpl">
                <tr>
                    <td width="100">{:__('multiplejson title')}</td>
                    <td>{:__('multiplejson type')}</td>
                    <td>{:__('multiplejson required')}</td>
                    <td >{:__('字段配置')}</td>
                    <td width="80">{:__('Operate')}</td>
                </tr>
                <tr>
                    <td colspan="4">
                        <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i>
                            {:__('Append')}</a>
                        <textarea name="row[multiplejson]" class="form-control hide" cols="30" rows="5"></textarea>
                    </td>
                </tr>
            </table>
            <script type="text/html" id="row[multiplejson]tpl">
                <tr>
                    <td><input type="text" name="<%=name%>[<%=index%>][title]" class="form-control" value="<%=row.title%>"/></td>
                    <td>
                        <select  id="c-type" class="form-control selectpicker" name="<%=name%>[<%=index%>][type]">
                            {foreach name="fieldList" item="vo"}
                                <option value="{$key}">{$vo}</option> 
                                <!-- <option value="{$key}" {in name="key" value="<%=row.id%>"}selected{/in}>{$vo}-{$key}-<%=row.id%></option> -->
                            {/foreach}
                        </select>
                        <!-- <input type="text" name="<%=name%>[<%=index%>][id]" data-rule="required" class="form-control selectpage" data-source="ajax/fieldType" value="2"/> -->
                    </td>
                    <td>
                        <select  id="c-required" class="form-control selectpicker" name="<%=name%>[<%=index%>][required]">
                                <option value="1">必填</option> 
                                <option value="2">选填</option> 
                                <!-- <option value="{$key}" {in name="key" value="<%=row.id%>"}selected{/in}>{$vo}-{$key}-<%=row.id%></option> -->
                        </select>
                    </td>
                    <td> <textarea name="<%=name%>[<%=index%>][config]" class="form-control " cols="30" rows="1" ><%=row.config%></textarea></td>
                    <td width="90">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td>
                </tr>
            </script>

        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>